//
//  FYNetworkingRequestStting.m
//  FYNetworking
//
//  Created by Felix Yin on 2017/5/5.
//  Copyright © 2017年 Felix Yin. All rights reserved.
//

#import "FYNetworkingRequestStting.h"

@implementation FYNetworkingRequestStting

- (instancetype)initWithRequestPath:(NSString *)path requestParameter:(NSDictionary *)parameter requestType:(FYREquestType)type  requestProgressCallBack:(FYRequestProgressCallBack)progressCallBack requestOperationCallBack:(FYRequestOperationCallBack)operationCallBack requestCompleteCallBack:(FYRequestCompleteCallBack)complete{
    self = [super init];
    self.requestPath = path;
    self.parameter = parameter;
    self.requestType = type;
    self.requestProgressCallBack = progressCallBack;
    self.requestOperationCallBack = operationCallBack;
    self.requestCompleteCallBack = complete;
    return self;
}

- (void)dealloc{
    NSLog(@"FYNetworkingRequestStting");
    self.requestProgressCallBack = nil;
    self.requestOperationCallBack = nil;
    self.requestCompleteCallBack = nil;
}

@end

@implementation FYNetworkingFileRequestStting

- (instancetype)initWithFileRequestPath:(NSString *)path requestParameter:(NSDictionary *)parameter requestType:(FYREquestType)type fileName:(NSString *)fileName dataName:(NSString *)dataName filePath:(NSString *)filePath mineType:(NSString *)mineType  uploadProgressCallBack:(FYRequestProgressCallBack)uploadProgressCallBack downloadProgress:(FYRequestProgressCallBack) downloadProgress requestOperationCallBack:(FYRequestOperationCallBack)operationCallBack requestCompleteCallBack:(FYRequestCompleteCallBack)complete{
    self = [super initWithRequestPath:path requestParameter:parameter requestType:type  requestProgressCallBack:nil requestOperationCallBack:operationCallBack requestCompleteCallBack:complete];
    self.downLoadProgressCallBack = downloadProgress;
    self.uploadProgressCallBack = uploadProgressCallBack;
    self.fileName = fileName; //带后缀
    self.dataName = dataName; //请求参数
    self.filePath = filePath;
    self.mineType = mineType;
    return self;
}

- (void)dealloc{
    NSLog(@"FYNetworkingFileRequestStting");
    self.requestProgressCallBack = nil;
    self.requestOperationCallBack = nil;
    self.requestCompleteCallBack = nil;
    self.downLoadProgressCallBack = nil;
    self.uploadProgressCallBack = nil;
}

@end
